function [A R]=detectar1(I)
 [F,C]=size(I);
 
 M=64;
 N=360;
 
 
 [x,y] = meshgrid(1:F,1:C);
 I1 = I.*((-1).^(x+y));            
 Rf=(fft2(I1));
 mag = (sqrt(real(Rf).^2 + imag(Rf).^2));

 RT=[];
 
 for key=1:100
   RandStream.setDefaultStream(RandStream('mt19937ar','seed',key));
   W=-1 + (1-(-1)).*rand(M/2,N/2);
  
   % W=reshape(W1,M/2,N/2);
   % W2(129:384,129:384)=W;
   W2=upsampled(W);  
    
   %RT(key)=sum(sum(W2(Imgpolar(:)==1).*mag(Imgpolar(:)==1)));
   
   RT(key)=sumar(W2,mag);
 end
   [a b]=max(RT);
   R=num2str(b);
   A=RT;
end